﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.IO;

namespace NetworkingProjectJoined
{
    public partial class ServerForm : Form
    {
        delegate void SetTextCallback(string text);
        public ServerForm()
        {
            InitializeComponent();
  
        }
        public void addClientName(string name)
        {
    
            if (m_lstClients.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(addClientName);
                Invoke(d, new object[] { name });
            }
            else
            {
                m_lstClients.Items.Add(new ListViewItem(name));
            }
           
        }

        private void m_btnStartGame_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
